package com.client.one.web;

import org.apache.log4j.Level;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by CHUMI on 2018/1/2.
 */
@RestController
public class ClientDemoController {
    private static final Logger LOG = Logger.getLogger(ClientDemoController.class.getName());
    @Value("${server.port}")
    String port;
    @RequestMapping("/hi")
    public String home(@RequestParam String name) {
        LOG.log(Level.INFO, "calling trace service-hi  ");
        return "hi "+name+",i am from port:" +port;
    }
}
